<?php
function getConnection(){
	if(isset($_SESSION['link']) && @mysql_ping($_SESSION['link'])){
		return $_SESSION['link'];
	}
	else{
		$link = @mysql_pconnect("localhost","selph","123456");
		mysql_select_db("expressedit", $link);
		$_SESSION['link'] = $link;
		return $link;
	}
}
function isAdmin(){
	return (isset($_SESSION['admin']) && $_SESSION['admin']);
}
?>